# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=libwpe
pkgver=1.10.1
pkgrel=1
pkgdesc="General-purpose library for WPE WebKit"
url="https://wpewebkit.org"
arch=(x86_64)
license=(custom)
depends=(libxkbcommon gcc-libs)
makedepends=(mesa git meson)
provides=(libwpe-1.0.so)
_commit=cdf940cd4ac489e2c3263b0d141c602521a891c5  # tags/1.10.1^0
source=("git+https://github.com/WebPlatformForEmbedded/libwpe?signed#commit=$_commit")
sha256sums=('SKIP')
validpgpkeys=('5AA3BC334FD7E3369E7C77B291C559DBE4C9123B') # Adrián Pérez de Castro <aperez@igalia.com>

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname/COPYING
}

# vim:set sw=2 et:
